﻿using UnityEngine;
using System.Collections;

public class diver : MonoBehaviour {

	public float velx;
	void Start () 
	{
	
	}
	

	void Update () 
	{	
		transform.Translate (velx * Time.deltaTime, 0, 0);


		if(transform.position.x > 15)
		{
			transform.position = new Vector3(-2.8f,Random.Range (-1.8f, 0.8f) , 0);
		}
	}
}
